import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * @Author 12629
 * @Description：
 */
class Person {
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
public class Test {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        try {
            int a = scanner.nextInt();
            int ret = 10/a;
            System.out.println("ret的值是："+ret);
        }catch (NullPointerException e) {
            System.out.println("我捕获了空指针异常！");
        }catch (ArithmeticException e) {
            System.out.println("我捕获了ArithmeticException异常！");
        }catch (InputMismatchException e) {
            System.out.println("输入的参数有异常!");
        }
        finally {
            scanner.close();
            System.out.println("finally执行了！");
        }
        System.out.println("after");
    }

    public static void main2(String[] args) {
        System.out.println("before");
        try {
            System.out.println(10/10);
            int[] array = {1,2,3};
            System.out.println(array[2]);
            System.out.println("fdsfsafdsdsafsafsa");
        }/*catch (ArithmeticException | NullPointerException e) {
            System.out.println();
        }*/
        catch (NullPointerException e) {
            e.printStackTrace();
            System.out.println("我捕获了空指针异常！");
        }catch (ArithmeticException e) {

        }catch (Exception e) {
            //e.printStackTrace();
            System.out.println("我捕获到了：Exception！,这里一般处理异常");
        }finally {
            System.out.println("finally执行了！");
        }
        System.out.println("after");
    }

    public static void main1(String[] args) {
        Person person = new Person();
        try {
            Person person2 = (Person) person.clone();
        }catch (CloneNotSupportedException e) {

        }
        System.out.println("11111111");;
        System.out.println("Fdsafafdsadsafsafdsfsadf");
    }
}
